package com.budwk.app.waterquality.enums;

import com.budwk.app.waterquality.vo.ParamProblemVo;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.ArrayList;
import java.util.List;

@Getter
@AllArgsConstructor
public enum WaterQEnum {
    Z("Z","水位", "cm"),
    Q("Q","流量", "m/s"),
    WT("WT","水温", "C"),
    PH("PH","ph值", "mg/L"),
    DOX("DOX","溶解氧", "mg/L"),
    COMN("COMN","高锰盐酸指数", "mg/L"),
    CODCR("CODCR","化学需氧量", "mg/L"),
    BOD5("BOD5","五日生化需氧量", "mg/L"),
    NH3N("NH3N","氨氮", "mg/L"),
    TP("TP","总磷", "mg/L"),
    TN("TN","总氮", "mg/L"),
    CU("CU","铜", "mg/L"),
    ZN("ZN","锌", "mg/L"),
    F("F","氟化物", "mg/L"),
    SE("SE","硒", "mg/L"),
    ARS("ARS","砷", "mg/L"),
    HG("HG","贡", "mg/L"),
    CD("CD","镉", "mg/L"),
    CR6("CR6","六价铬", "mg/L"),

    ;

    private  String field; // 字段名称
    private  String name; // 字段单位
    private  String fieldUnit; // 字段单位

    public static List<ParamProblemVo> buildDefaults() {
        List<ParamProblemVo> paramProblemVos = new ArrayList<>();
        for (WaterQEnum e : values()) {
            ParamProblemVo p = new ParamProblemVo();
            p.setField(e.getField()).setFieldUnit(e.getFieldUnit()).setName(e.getName());
            paramProblemVos.add(p);
        }
        return paramProblemVos;
    }
}
